<template>
  <el-form class="list-b-12" :model="data" label-width="auto" ref="ruleFormRef" :disabled="disabled">
    <slot :form="data" />
  </el-form>
</template>
<script setup lang="ts">
import { getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance() as any;
//获取父级数据
const props = withDefaults(
  defineProps<{
    data: any;
    button?: string;
    disabled?: boolean;
  }>(),
  {
    button: '保存',
  },
);
const emit = defineEmits<{
  //fn为父组件引入子组件是定义的子组件事件属性，可随意定义
  (event: 'saveBtn', form: any): void;
}>();
</script>
<style scoped></style>
